/*
 * XML Type:  Discount
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Discount
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Discount(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class DiscountImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Discount
{
    
    public DiscountImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DSCRATE$0 = 
        new javax.xml.namespace.QName("", "DSCRATE");
    private static final javax.xml.namespace.QName DSCAMT$2 = 
        new javax.xml.namespace.QName("", "DSCAMT");
    private static final javax.xml.namespace.QName DSCDATE$4 = 
        new javax.xml.namespace.QName("", "DSCDATE");
    private static final javax.xml.namespace.QName DSCDESC$6 = 
        new javax.xml.namespace.QName("", "DSCDESC");
    
    
    /**
     * Gets the "DSCRATE" element
     */
    public java.lang.String getDSCRATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCRATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DSCRATE" element
     */
    public net.ofx.types.x2003.x04.RateType xgetDSCRATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(DSCRATE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DSCRATE" element
     */
    public void setDSCRATE(java.lang.String dscrate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCRATE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DSCRATE$0);
            }
            target.setStringValue(dscrate);
        }
    }
    
    /**
     * Sets (as xml) the "DSCRATE" element
     */
    public void xsetDSCRATE(net.ofx.types.x2003.x04.RateType dscrate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(DSCRATE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.RateType)get_store().add_element_user(DSCRATE$0);
            }
            target.set(dscrate);
        }
    }
    
    /**
     * Gets the "DSCAMT" element
     */
    public java.lang.String getDSCAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCAMT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DSCAMT" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetDSCAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(DSCAMT$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DSCAMT" element
     */
    public void setDSCAMT(java.lang.String dscamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCAMT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DSCAMT$2);
            }
            target.setStringValue(dscamt);
        }
    }
    
    /**
     * Sets (as xml) the "DSCAMT" element
     */
    public void xsetDSCAMT(net.ofx.types.x2003.x04.AmountType dscamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(DSCAMT$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(DSCAMT$2);
            }
            target.set(dscamt);
        }
    }
    
    /**
     * Gets the "DSCDATE" element
     */
    public java.lang.String getDSCDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCDATE$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DSCDATE" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDSCDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DSCDATE$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "DSCDATE" element
     */
    public boolean isSetDSCDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DSCDATE$4) != 0;
        }
    }
    
    /**
     * Sets the "DSCDATE" element
     */
    public void setDSCDATE(java.lang.String dscdate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCDATE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DSCDATE$4);
            }
            target.setStringValue(dscdate);
        }
    }
    
    /**
     * Sets (as xml) the "DSCDATE" element
     */
    public void xsetDSCDATE(net.ofx.types.x2003.x04.DateTimeType dscdate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DSCDATE$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DSCDATE$4);
            }
            target.set(dscdate);
        }
    }
    
    /**
     * Unsets the "DSCDATE" element
     */
    public void unsetDSCDATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DSCDATE$4, 0);
        }
    }
    
    /**
     * Gets the "DSCDESC" element
     */
    public java.lang.String getDSCDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCDESC$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DSCDESC" element
     */
    public net.ofx.types.x2003.x04.ShortMessageType xgetDSCDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(DSCDESC$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DSCDESC" element
     */
    public void setDSCDESC(java.lang.String dscdesc)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DSCDESC$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DSCDESC$6);
            }
            target.setStringValue(dscdesc);
        }
    }
    
    /**
     * Sets (as xml) the "DSCDESC" element
     */
    public void xsetDSCDESC(net.ofx.types.x2003.x04.ShortMessageType dscdesc)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(DSCDESC$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().add_element_user(DSCDESC$6);
            }
            target.set(dscdesc);
        }
    }
}
